package hrms.service;

import hrms.dao.WorkChangeMapper;
import hrms.entity.WorkChange;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class WorkChangeService {
    @Autowired
    private WorkChangeMapper workChangeMapper;

    public int insertWorkChange(WorkChange workChange){
        int res = workChangeMapper.insertWorkChange(workChange);
        return res;
    }

    public int updateWorkChange(WorkChange workChange){
        int res = workChangeMapper.updateWorkChange(workChange);
        return res;
    }

    public int deleteWorkChangeById(Integer id){
        int res = workChangeMapper.deleteWorkChangeById(id);
        return res;
    }

    public List<WorkChange> selectAllWorkChange(){
        List<WorkChange> res = workChangeMapper.selectAllWorkChange();
        return res;
    }

    public List<WorkChange> selectWorkChangeByStaffId(Integer id){
        List<WorkChange> res = workChangeMapper.selectWorkChangeByStaffId(id);
        return res;
    }
}
